<div id="error" style="color:#;">
  <?php 
    echo @$this->session->flashdata('error_title');
  ?>
</div>
<script language="javascript">
    // apply filters

   var applyFilter = function(){
       jQuery("#list").setGridParam({
          url: '<?php echo site_url() ?>/CompanyEntrega/dataEnt',
        page:1,
        postData:{
            search: true,
            name: $('#name').val(),
            dispara_fin:$('.f_fin:checked').val()
        }
    }).trigger("reloadGrid");
}


    jQuery(document).ready(function(){
        jQuery("#list").jqGrid({
            url: '<?php echo site_url() ?>/CompanyEntrega/dataEnt',
            mtype: 'POST',
            datatype: 'json',
            colNames:['ID','Producto','Referencia','Entregado A.','Entregado P.','Fecha E.','Contacto','Telefono','Email','Nota'],
            colModel :[
                   {name:'ID', index:'Id_Historico', width:2,hidden:true},
                   {name:'Producto', index:'Id_Historico', width:20},
                   {name:'Referencia', index:'Id_Historico', width:30},
                   {name:'Entregadoa', index:'Entregado_A', width:15},
                   {name:'Entregadop', index:'Entregado_Por', width:20},
                   {name:'Fecha', index:'date', width:20},
                   {name:'Contacto', index:'Id_Historico', width:18},
                   {name:'Telefono', index:'Id_Historico', width:18},
                   {name:'Email', index:'Id_Historico', width:30},
                   {name:'nota', index:'Id_Historico', width:40}
                  
                   ],
            pager: jQuery('#pager'),
            hiddengrid: false,
            sortname: 'Id_Historico',
            rowNum:50,
            rowList:[50,150,250,500,1000],
            sortorder: "asc",
            height: '100%',
            width: '650',
            imgpath: _base_url + 'public/css/jqgrid/flex/images',
            viewrecords: true,
            multiselect: false,
            adjacents: 4,
            jsonReader: { repeatitems : false, ID: "0" }
        }).navGrid('#pager',{add:false,del:false,edit:false,search:false,position:"left"})
        
        .navButtonAdd('#pager',{caption:"", buttonimg: _base_url + "public/css/jqgrid/flex/images/text_columns.png", onClickButton:function(){ jQuery("#list").setColumns();} })
        
        ; $('#apply_filter').bind('click', applyFilter);
    });
</script>
<div class="table_container">
<table>
    <tr>
    	<td><div id="titulo">Historico de Gestion Entrega</div></td>
    </tr>
    <tr>
        <td>
            <table id="list" class="scroll"></table>
            <div id="pager" class="scroll" style="text-align:center;"></div>
        </td>
	</tr>
 </table>
</div>